list_node* reverse_list(list_node* head, int L, int R)
{
	list_node* virnode = new list_node();
	virnode->next = head;
	list_node* pre = virnode;
	for (int i = 0;i < L - 1;i++)
	{
		pre = pre->next;
	}
	list_node* cur = pre->next;
	list_node* next;
	for (int i = 0;i < R - L;i++)
	{
		next = cur->next;
		cur->next = next->next;
		next->next = pre->next;
		pre->next = next;
	}
	return virnode->next;
}